from decimal import Decimal
from pydantic import Field
from datetime import date
from app.models import SQLModel


class LineItem(SQLModel):
    dateline: date = Field(nullable=False, index=True, description='数据所属日期(刻度为 1 天): 2024-04-22')
    vendor_id: int = Field(nullable=False, index=True, description='供应商: 阿里云')
    line_id: int = Field(nullable=False, index=True, description='线路: 北京三线')
    billing_id: int = Field(nullable=False, description='计费方式: 增强95')
    bw_contract: int = Field(default=0.0, nullable=False, description='合同带宽(Mbps)')
    price: Decimal = Field(default=0, description="单价(带宽/流量)")
